//
//  GeoJson.h
//  Trackit
//
//  Created by yaodaobin on 2017/4/18.
//  Copyright © 2017年 yaodaobin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GeoFeature.h"
#import "UploadImageInfo.h"


@interface GeoJson : NSObject

@property (nonatomic, copy) NSString *type;
@property (nonatomic, strong) NSMutableArray <GeoFeature *>*features;

- (instancetype)initWithDictionary:(NSDictionary *)dictionary;

+ (NSMutableDictionary *)getGeoJson:(GeoJson *)geoJson;
+ (void)saveJsonToCache:(NSString *)idString geoJson:(GeoJson *)geoJson;
+ (void)saveImagesToCache:(NSString *)idString images:(NSArray *)images;
//上传成功后删除已上传的本地图片，失败的图片下次上传时仍然使用本地图片
+ (void)deleteImagesCache:(NSString *)idString paths:(NSArray *)paths;
+ (BOOL)deleteTaskCache:(NSString *)idString;
+ (BOOL)deleteAllCache;
+ (BOOL)deleteJsonCache:(NSString *)idString;
+ (NSArray <UIImage *>*)getCacheImages:(NSArray *)localPaths;
+ (GeoJson *)getGeoJsonFromCache:(NSString *)idString;


+ (NSMutableDictionary *)getFeature:(GeoFeature *)feature;
+ (GeoFeature *)getGeoFeatureFromCache:(NSString *)idString;
+ (BOOL)saveFeatureToCache:(NSString *)idString feature:(GeoFeature *)feature;
+ (BOOL)deleteGeoFeatureCache:(NSString *)idString;

@end
